﻿//--------------------------------------------------------------------------------------------------------------------------------------------------------
// <copyright file="RegistrationAction.cs">
//     Copyright © 2010 Oli Francis
//     This source code is subject to the terms and conditions of the MIT license. A copy of the license can be found in the license.txt 
//     file at the root of this distribution. By using this source code in any fashion, you are agreeing to be bound by the terms of the MIT License. 
//     You must not remove this notice from the software.
// </copyright>
// <author>Oli</author>
//-------------------------------------------------------------------------------------------------------------------------------------------------------

namespace TeamBrain.Tests.Units.Registration
{
    using Moq;

    using NUnit.Framework;

    using TeamBrain.Domain.Core;
    using TeamBrain.Domain.Core.Repositories;
    using TeamBrain.Domain.Services.Email;
    using TeamBrain.Domain.Services.Registration;
    using TeamBrain.Domain.Services.Security;

    public class RegistrationAction
    {
        protected IRegistrationService RegistrationService { get; set; }

        protected Mock<IUserRepository> UserRepository { get; set; }
        
        protected Mock<IEmailService> EmailService { get; set; }
        
        protected Mock<IUnitOfWork> UnitOfWork { get; set; }
        
        protected Mock<IPasswordHasher> PasswordHasher { get; set; }

        protected Mock<ISecurityService> SecurityService { get; set; }

        [SetUp]
        public void Initialize()
        {
            this.UserRepository = new Mock<IUserRepository>();
            this.EmailService = new Mock<IEmailService>();
            this.UnitOfWork = new Mock<IUnitOfWork>();
            this.PasswordHasher = new Mock<IPasswordHasher>();
            this.SecurityService = new Mock<ISecurityService>();

            this.RegistrationService = new RegistrationService(
                this.UnitOfWork.Object,
                this.UserRepository.Object,
                this.EmailService.Object,
                this.PasswordHasher.Object,
                this.SecurityService.Object);
        }
    }
}
